home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / Goodies / Animation Libraries / GENetRelease2ƒ / GEDemo / Cannon.h < prev    next >
Text File  |  1994-05-31  |  1KB  |  72 lines

  1. /*
  2.     Cannon.h
  3.     
  4.     Cannon scene for GEDemo
  5.     
  6.     Copyright 1993 by Al Evans. All rights reserved.
  7.     
  8.     11/3/93
  9.     
  10. */
  11.  
  12. #ifdef applec
  13. #ifndef __cplusplus
  14. #ifndef PRELOAD
  15. #pragma load "::ToolKit.precompile"
  16. #define PRELOAD
  17. #endif
  18. #endif
  19. #endif
  20.  
  21. #ifndef GRAPHELEMENTS
  22. #include "GraphElements.h"
  23. #endif
  24.  
  25. #ifndef GESENSORS
  26. #include "Sensors.h"
  27. #endif
  28.  
  29.  
  30. //Resource numbers of PICTs making up cannon scene
  31. #define rBallPic    600
  32. #define rCannonPic    601
  33. #define rSmokePic    602
  34. #define rFBtnPic    650
  35.  
  36. //Cannon position
  37. #define cannonLeft    390
  38. #define cannonTop    210
  39.  
  40. //Cannon scene planes
  41. #define cannonPlane    rCannonPic
  42. #define ballPlane    cannonPlane - 1
  43. #define smokePlane    cannonPlane + 1
  44. //Button is just in front of background
  45. #define btnPlane    4
  46.  
  47. //Cannon scene IDs
  48. #define cannonID    'CANN'
  49. #define ballID         'BALL'
  50. #define smokeID        'SMOK'
  51. #define fBtnID        'FBtn'
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57. Boolean LoadCannonScene(GEWorldPtr world);
  58.  
  59. //Cannonball autochange proc
  60. pascal void DoCannonBall(GEWorldPtr world, GrafElPtr ball);
  61.  
  62. //Cannonball collision proc
  63. pascal void DoBallHit(GEWorldPtr world, GrafElPtr ball, GEDirection dir, 
  64.                                     CollisionPhase phase, GrafElPtr objHit);
  65.  
  66. //Call to start cannon scene animation
  67. pascal void ShootCannon(GEWorldPtr world, short fireIt);
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.